import request from "../utils/request.js";

const BASE_PREFIX = '/authorization';

export default {
  login(data) {
    return request({
      url: `${BASE_PREFIX}/login`,
      method: 'post',
      data: data
    })
  },
  getVerifyCode(loginText, type) {
    return request({
      url: `${BASE_PREFIX}/getVerifyCode`,
      method: 'POST',
      data: {
        loginText: loginText,
        type: type
      }
    })
  },
  logout() {
    return request({
      url: `${BASE_PREFIX}/logout`,
      method: 'POST'
    })
  },

  getUserInfoByCurrentLogin() {
    return request({
      url: `${BASE_PREFIX}/getUserInfoByCurrentLogin`,
      method: 'GET'
    })
  }

}